Imports System.Data.SqlClient
Public Class PC_IPs
    Public Shared Function getIP() As SortedList
        Dim cmd As New SqlCommand("select * from PC_IP", Dbinterface.Connection)

        Dim reader As SqlDataReader = cmd.ExecuteReader
        Dim list As New SortedList
        While reader.Read
            Dim ip As New PcIpInfo
            With ip
                .PcIp = reader("PC_IP").ToString
                .PcName = reader("PC_NAME").ToString
                .Active = reader("ACTIVE").ToString
                .Ip = reader("IP").ToString
                .Note = reader("NOTE").ToString
                list.Add(ip.PcIp, ip)

            End With
        End While
        reader.Close()
        reader = Nothing
        cmd = Nothing
        Return list
    End Function
End Class